﻿using Microsoft.AspNetCore.Mvc;

namespace Qy.Web.Areas.Api;

public class Base : Controller
{
    public Base()
    {

    }

    protected IActionResult Success(object data)
    {
        return Json(new { Status = 1, data });
    }

    protected IActionResult Success(object data, string msg = "")
    {
        return Json(new { Status = 1, data, Msg = msg });
    }

    protected IActionResult Success(string msg)
    {
        return Json(new { Status = 1, Msg = msg });
    }

    protected IActionResult Fail(string msg)
    {
        return Json(new { Status = 0, Msg = msg });
    }




}
